home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / AMOS / AMOSList0597 / AMOSLIST / text0292.txt < prev    next >
Encoding:
Text File  |  1997-06-01  |  1.9 KB  |  72 lines

  1. On 25-May-97, --==MURRAY==-- wrote:
  2.  
  3. >Say for a horizontal scrolling system. Using offset to move along
  4. >and then every 16 or 32 pixels, it copys the screen across to the
  5. >left, draws the side, resets the screen offset and continues.
  6.  
  7.    Okay, you realize this is never going to be very fast. Transfering
  8.    such a huge block of ChipRAM via the blitter is a BIG bottleneck...
  9.  
  10.  
  11. >My problem is that I need the screen swap and screen offset to
  12. >happen at the same time, because otherwise there is a flicker as
  13. >either the screen offset moves across before the screen has been
  14. >swapped OR the screen is swapped before the screen offset is
  15. >reset.
  16.  
  17.    I assume you have the auto Bob Updates & Screen Swapping
  18.    deactivated (Bob Update Off), right?
  19.  
  20.  
  21. >I've tried Wait Vbl and Vbl Wait X and Wait Raster in all possible 
  22. >positions to try and get the commands to have been executed
  23. >before the next cycle is drawn.
  24.  
  25. >I can only think that as soon as either of these commands are
  26. >called, it must immediately draw the screen.
  27.  
  28.    Right!! You are having a bit of trouble which is really more AMOS's
  29.    fault (sometimes it tries too hard to be "friendly")...
  30.  
  31.    To avoid these problems you need to go "low level" in your AMOS
  32.    programming:
  33.  
  34.    Deactivate the automatic Bob Updates, Screen Swapping, etc.
  35.  
  36.    Bob Update Off : Autoback 0
  37.  
  38.    and the MAIN culprit which most people overlook...
  39.  
  40.    Auto View Off
  41.  
  42.  
  43.    Now, using a structure such as:
  44.  
  45.    Repeat
  46.       Bob Clear
  47.       Some_Code_Doing_Many_Complex_Things 
  48.       Some_More_Code_Handling_The_Scrolling
  49.       Bob Draw
  50.       
  51.       Screen Swap : View : Wait Vbl
  52.    Until STAGECOMPLETE
  53.  
  54.  
  55.    The View will cause EVERYTHING to be updated "at once" which
  56.    will allow you to gain control similiar to that found in BLITZ or
  57.    Assembler.
  58.  
  59.    It will certainly be almost impossible to have this updated in 1 Vbl,
  60.    but this structure should prevent the "glitches".
  61.  
  62.  
  63.  
  64.             Hope that helps...
  65.  
  66.             Garfield
  67.  
  68.  
  69.  
  70.  
  71.  
  72.